package entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

@Entity
public class Customer extends SaleLead implements Serializable {
   
    @ManyToOne(cascade= CascadeType.ALL)
    private CustomerExecutive customerExecutive;
    @OneToMany
    private List<PurchaseOrder> purchaseOrders = new ArrayList<PurchaseOrder>();

    @OneToOne
    private CreditAccount creditAccount;
    
    public CustomerExecutive getCustomerExecutive() {
        return customerExecutive;
    }

    public void setCustomerExecutive(CustomerExecutive customerExecutive) {
        this.customerExecutive = customerExecutive;
    }

    public List<PurchaseOrder> getPurchaseOrders() {
        return purchaseOrders;
    }

    public void setPurchaseOrders(List<PurchaseOrder> purchaseOrders) {
        this.purchaseOrders = purchaseOrders;
    }

    public CreditAccount getCreditAccount() {
        return creditAccount;
    }

    public void setCreditAccount(CreditAccount creditAccount) {
        this.creditAccount = creditAccount;
    }

    
    
}
